package com.symone.webcms.mapper;

import com.symone.webcms.model.Message;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.symone.webcms.model.vo.MessageVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.plugins.Page;

import java.util.List;

/**
 *   @description : Message Mapper 接口
 *   ---------------------------------
 * 	 @author Archer Chu
 *   @since 2019-03-13
 */
@Repository
public interface MessageMapper extends BaseMapper<Message> {

        boolean deleteFlagById(long id);

        List<MessageVO> getMessageBox(@Param("fromId")Long fromId, @Param("toId")Long toId, @Param("isRead")Integer isRead);

        List<MessageVO> getMessageBox(Page<MessageVO> page, @Param("fromId")Long fromId, @Param("toId")Long toId, @Param("isRead")Integer isRead);

        MessageVO getMessageVOById(Long id);
}